# ifndef DEF_PERSONAGE
# define DEF_PERSONAGE

# include "Source.h"

/*
*	This class is the base of all the classes of living creatures in the game.
*/

class Personage
{
	public:

	Personage();
	~Personage();

	void setName( const std::string&);
	virtual void setLevel( unsigned int);
	void setSize( Ogre::Real);
	void setPosition( Ogre::Vector3);
	void setDirection( Ogre::Vector3);

	void addDirection( const Ogre::Vector3&, Ogre::Real);

	int getCurrentLife();
	int getLife();
	Ogre::Vector3 getPosition();
	Ogre::Real getSize();
	Ogre::String getNodeName();
	const std::string& getName();
	virtual const Ogre::String getFullName();

	void receiveDamage( const Damage&);
	void clearPath();

	protected:

	void init( Renderer*);

	Renderer* myRenderer;

	Ogre::String myName;

	Ogre::SceneNode* mySceneNode;
	Ogre::SceneNode* myBodyNode;
	Ogre::Entity* myBody;

	std::stack< Ogre::Vector3> myDirections;
	std::stack< Ogre::Real> myDistances;

	Ogre::Vector3 myDirection;
	Ogre::Real mySpeed;
	Ogre::Real myDistance;

	Ogre::Real mySize;

	bool myActive;
	int myLife;
	int myLifeCurrent;

	unsigned int myLevel;

	float myTimeAction;
};

# endif